package com.ld.security.common.activiti.core.service;

import com.ld.security.common.activiti.core.BaseFlowService;
import com.ld.security.common.activiti.core.BaseFlowServiceImpl;
import com.ld.security.common.activiti.core.po.CompleteTaskPo;
import com.ld.security.common.activiti.core.po.FlowPagePo;
import com.ld.security.common.activiti.core.po.TaskPagePo;
import com.ld.security.common.activiti.core.vo.FlowPageVo;
import com.ld.security.common.activiti.core.vo.TaskPageVo;
import org.activiti.engine.repository.Deployment;
import org.springframework.stereotype.Component;

/**
 * 演示用的例子
 */
@Component
public class UserFlowService extends BaseFlowServiceImpl {

    @Override
    public String createDeployment() {
        Deployment deployment =repositoryService

                .createDeployment()
                .addClasspathResource("processes/UserAudit.bpmn")
                .name("UserAudit")
                .deploy();

        return deployment.getId();
    }

    /**
     * 流程图的keu
     * @return
     */
    @Override
    protected String getProcessInstanceByKey() {
        return "blogerProcess";
    }
}
